﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.ComponentModel;
using System.Waf.Applications;
using ImageClipTool.Applications.Views;
using ImageClipTool.Applications.ViewModels;

namespace ImageClipTool.Presentation.Views
{
    /// <summary>
    /// Interaction logic for SettingWindow.xaml
    /// </summary>
    [Export(typeof(IImageClipWindow))]
    public partial class ImageClipWindow : Window, IImageClipWindow
    {
        private readonly Lazy<ImageClipViewModel> viewModel;

        public ImageClipWindow()
        {
            InitializeComponent();
            viewModel = new Lazy<ImageClipViewModel>(() => ViewHelper.GetViewModel<ImageClipViewModel>(this));
        }

        protected override void OnClosing(CancelEventArgs e)
        {
            e.Cancel = true;  // cancels the window close    
            this.Hide();      // Programmatically hides the window
        }

    }
}
